package com.datamation.swadeshi.control;

import com.github.johnpersano.supertoasts.SuperActivityToast;
import com.github.johnpersano.supertoasts.SuperToast;

import android.app.Activity;

public class Toast {

	SuperActivityToast superActivityToast;
	
	public void createToastMessage(String title, Activity activity) {
		
	   superActivityToast = new SuperActivityToast(activity,SuperToast.Type.STANDARD);
	   superActivityToast.setText(title);
	   superActivityToast.setAnimations(SuperToast.Animations.FLYIN);
	   superActivityToast.setDuration(SuperToast.Duration.SHORT);
	   superActivityToast.setBackground(SuperToast.Background.BLACK);
	   superActivityToast.setTextSize(SuperToast.TextSize.SMALL);
	   //superActivityToast.setIcon(SuperToast.Icon.Dark.INFO, SuperToast.IconPosition.LEFT);
	   superActivityToast.show();
	}
	
	
	public void createToastErrorMessage(String title, Activity activity) {
		
		   superActivityToast = new SuperActivityToast(activity,SuperToast.Type.STANDARD);
		   superActivityToast.setText(title);
		   superActivityToast.setAnimations(SuperToast.Animations.FLYIN);
		   superActivityToast.setDuration(SuperToast.Duration.SHORT);
		   superActivityToast.setBackground(SuperToast.Background.RED);
		   superActivityToast.setTextSize(SuperToast.TextSize.SMALL);
		   //superActivityToast.setIcon(SuperToast.Icon.Dark.INFO, SuperToast.IconPosition.LEFT);
		   superActivityToast.show();
		}
}
